//用while循环求Fibonacci序列
public class Class2 {

		public static void main (String[] args){
			// 斐波那契的第一个值
			int num1 = 1;
			// 斐波那契的第二个值
			int num2 = 1;
			int count = 1;
			// 先打印前两个数
			System.out.print("1 1 ");
			while(count <=28){
				int temp = num1;
				num1 = num2;
				num2 += temp;
				System.out.print(num2 + " ");
				count +=1;
			}
		}
	}


